### Environment constants 

ARCH ?=arm
CROSS_COMPILE ?=arm-linux-gnueabihf-
export

LIB_DIR := lib_dll
### general build targets

all: libdir
	@echo "---sx1276.a-----------------------------------------------"
	$(MAKE) all -e -C sx1276
	@echo "---sx1301.a-----------------------------------------------"
	$(MAKE) all -e -C sx1301
	@echo "---md134x.a-----------------------------------------------"
	$(MAKE) all -e -C md134x
	@cp sx1276/lib/* $(LIB_DIR)/
	@cp sx1301/lib/* $(LIB_DIR)/
	@cp md134x/lib/* $(LIB_DIR)/
    
libdir:
	@mkdir -p $(LIB_DIR)
    
clean:
	@echo "---sx1276-------------------------------------------------"
	$(MAKE) clean -e -C sx1276
	@echo "---sx1301-------------------------------------------------"
	$(MAKE) clean -e -C sx1301
	@echo "---md134x-------------------------------------------------"
	$(MAKE) clean -e -C md134x
	@rm -rf $(LIB_DIR)
### EOF
